/*
 * @Author: 江舟 jijiangzhou@recycloud.cn
 * @Date: 2024-05-21 16:56:34
 * @LastEditors: 江舟 jijiangzhou@recycloud.cn
 * @LastEditTime: 2024-05-21 17:05:57
 * @FilePath: \vite-project\src\hooks\usePre.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useEffect, useRef } from 'react';

const usePre = value => {
	const ref = useRef();

	useEffect(() => {
		ref.current = value;
	});

	return ref.current;
};

export default usePre;
